/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * About.java
 *
 * Created on Jul 15, 2011, 2:23:21 PM
 */
package com.viweb.storemanager.ui;

import com.viweb.storemanager.common.ImagePnl;
import java.awt.image.BufferedImage;
import javax.imageio.ImageIO;

/**
 *
 * @author qhvic
 */
public class AboutDlg extends javax.swing.JDialog {

    private BufferedImage image = null;

    /** Creates new form About */
    public AboutDlg(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        try {
            image = ImageIO.read(getClass().getResource("/com/viweb/storemanager/imgae/splash.jpg"));
        } catch (Exception ex) {
            System.out.print(ex.getMessage());
        }
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        btnClose = new javax.swing.JButton();
        pnlAbout = new ImagePnl(image, ImagePnl.ACTUAL);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Thông tin sản phẩm");
        getContentPane().setLayout(new java.awt.GridBagLayout());

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/viweb/storemanager/imgae/media_stop_red.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.setToolTipText("Đóng cửa sổ giới thiệu");
        btnClose.setMaximumSize(new java.awt.Dimension(80, 26));
        btnClose.setMinimumSize(new java.awt.Dimension(80, 26));
        btnClose.setPreferredSize(new java.awt.Dimension(80, 26));
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 1;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);
        getContentPane().add(btnClose, gridBagConstraints);

        pnlAbout.setPreferredSize(new java.awt.Dimension(0, 0));
        pnlAbout.setLayout(new java.awt.BorderLayout());
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
        gridBagConstraints.weightx = 1.0;
        gridBagConstraints.weighty = 1.0;
        gridBagConstraints.insets = new java.awt.Insets(5, 5, 0, 5);
        getContentPane().add(pnlAbout, gridBagConstraints);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        // TODO add your handling code here:
        this.dispose();
    }//GEN-LAST:event_btnCloseActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JPanel pnlAbout;
    // End of variables declaration//GEN-END:variables
}
